Spread ASP.NET 6.0 Product Documentation
GenerateFromCellRanges(SheetView,CellRange[],Boolean) Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Chart Namespace > SpreadChart Class > GenerateFromCellRanges Method : GenerateFromCellRanges(SheetView,CellRange[],Boolean) Method


sheetView
The sheet view.
cellRanges
The cell ranges.
autoSwitch
if set to true, the processing will switch rows and columns automatically if necessary.

Glossary Item Box

Generates from cell ranges.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub GenerateFromCellRanges( _
   ByVal sheetView As SheetView, _
   ByVal cellRanges() As CellRange, _
   ByVal autoSwitch As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As SpreadChart
Dim sheetView As SheetView
Dim cellRanges() As CellRange
Dim autoSwitch As Boolean
 
instance.GenerateFromCellRanges(sheetView, cellRanges, autoSwitch)
C# 
public void GenerateFromCellRanges( 
   SheetView sheetView,
   CellRange[] cellRanges,
   bool autoSwitch
)

Parameters

sheetView
The sheet view.
cellRanges
The cell ranges.
autoSwitch
if set to true, the processing will switch rows and columns automatically if necessary.

Remarks

The category parameter is for the category cell range; the seriesName parameter is for the series name cell range; and the data parameter is for the data cell range. The sheetView parameter is how the three cell ranges relate to the SheetView. This function can be used to rebuild a chart.

Example

This example uses the GenerateFromCellRanges method.
C#Copy Code
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart(typeof(FarPoint.Web.Chart.BarSeries));
chart.GenerateFromCellRanges(FpSpread1.Sheets[0], new FarPoint.Web.Spread.Model.CellRange(1, 0, 6, 1), new FarPoint.Web.Spread.Model.CellRange(0, 1, 1, 3), new FarPoint.Web.Spread.Model.CellRange(1, 1, 6, 3), true);
FpSpread1.Sheets[0].Charts.Add(chart);
Visual BasicCopy Code
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart(GetType(FarPoint.Web.Chart.BarSeries))
chart.GenerateFromCellRanges(FpSpread1.Sheets(0), New FarPoint.Web.Spread.Model.CellRange(1, 0, 6, 1), New FarPoint.Web.Spread.Model.CellRange(0, 1, 1, 3), New FarPoint.Web.Spread.Model.CellRange(1, 1, 6, 3), True)
FpSpread1.Sheets(0).Charts.Add(chart)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.